<?php 
//生成二维码
$url = 'xxx';
$qrCode = new QrCode('QrCode');
$qrCode->setSize(200);
$qrCode->setText($url)->setWriterByName('png');
$barcode=$qrCode->writeDataUri();//接受图片数据流